<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'employees-form',
	'enableAjaxValidation'=>false,
        'htmlOptions'=>array(
            'enctype'=>'multipart/form-data'
        )
)); 

?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>
<div class="left-column" style= "margin-right:70px;">              
        <div class="row short">
            <?php echo $form->labelEx($model, 'unassign'); ?>
            <?php echo $form->textField($model, 'unassign', array('size' => 1, 'maxlength' => 1)); ?>
            <?php echo $form->error($model, 'unassign'); ?>
        </div>

        <div class="row short">
            <?php echo $form->labelEx($model, 'status'); ?>
            <?php echo $form->dropDownList($model, 'status',$model->getStatusList()); ?>
            <?php echo $form->error($model, 'status'); ?>
        </div>
        <div class="row short">
            <?php echo $form->labelEx($model, 'empno'); ?>
            <?php echo $form->textField($model, 'empno'); ?>
            <?php echo $form->error($model, 'empno'); ?>
        </div>
        <div class="row short">
		<?php echo $form->labelEx($model,'firstname'); ?>
		<?php echo $form->textField($model,'firstname',array('size'=>60,'maxlength'=>75)); ?>
		<?php echo $form->error($model,'firstname'); ?>
	</div>

	<div class="row short">
		<?php echo $form->labelEx($model,'middlename'); ?>
		<?php echo $form->textField($model,'middlename',array('size'=>60,'maxlength'=>75)); ?>
		<?php echo $form->error($model,'middlename'); ?>
	</div>

	<div class="row short">
		<?php echo $form->labelEx($model,'lastname'); ?>
		<?php echo $form->textField($model,'lastname',array('size'=>60,'maxlength'=>75)); ?>
		<?php echo $form->error($model,'lastname'); ?>
	</div>
        
	
		
	<div class="row short">
		<?php echo $form->labelEx($model,'suffix'); ?>
		<?php echo $form->textField($model,'suffix',array('size'=>5,'maxlength'=>5)); ?>
		<?php echo $form->error($model,'suffix'); ?>
	</div>

	
	<div class="row short" style="height:46px;">
		<?php echo $form->labelEx($model,'add1'); ?>
		<?php echo $form->textField($model,'add1',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'add1'); ?>
	</div>

	<div class="row short" style="height:46px;">
		<?php echo $form->labelEx($model,'add2'); ?>
		<?php echo $form->textField($model,'add2',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'add2'); ?>
	</div>

	<div class="row short">
		<?php echo $form->labelEx($model,'city'); ?>
		<?php echo $form->textField($model,'city',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'city'); ?>
	</div>

	<div class="row short">
		<?php echo $form->labelEx($model,'state'); ?>
		<?php echo $form->dropDownList($model,'state',  getStateList()); ?>
		<?php echo $form->error($model,'state'); ?>
	</div>

	<div class="row short">
		<?php echo $form->labelEx($model,'zip'); ?>
		<?php echo $form->textField($model,'zip',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'zip'); ?>
	</div>

	<div class="row short">
		<?php echo $form->labelEx($model,'county'); ?>
		<?php echo $form->textField($model,'county',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'county'); ?>
	</div>

	<div class="row short">
		<?php echo $form->labelEx($model,'country'); ?>
		<?php echo $form->textField($model,'country',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'country'); ?>
	</div>

	<div class="row short">
		<?php echo $form->labelEx($model,'timezone'); ?>
		<?php echo $form->dropDownList($model,'timezone',$model->getTimeZoneList()); ?>
		<?php echo $form->error($model,'timezone'); ?>
	</div>
        
        
	<div class="row short" style="height:46px;">
		<?php echo $form->labelEx($model,'maritalstatus'); ?>
		<?php echo $form->dropDownList($model,'maritalstatus',$model->getMaritalStatusList()); ?>
		<?php echo $form->error($model,'maritalstatus'); ?>
	</div>

	<div class="row short">
		<?php echo $form->labelEx($model,'gender'); ?>
		<?php echo $form->dropDownList($model,'gender',$model->getGenderList()); ?>
		<?php echo $form->error($model,'gender'); ?>
	</div>
        
	<div class="row short">
		<?php echo $form->labelEx($model,'ethnicgroup'); ?>
		<?php echo $form->dropDownList($model,'ethnicgroup',$model->getEthnicityList()); ?>
		<?php echo $form->error($model,'ethnicgroup'); ?>
	</div>
	<div class="row short">
		<?php echo $form->labelEx($model,'birthdate'); ?>
		<?php $this->widget('zii.widgets.jui.CJuiDatePicker',array(
                    'model'=>$model,
                    'attribute'=>'birthdate',
                    'value'=>CTimestamp::formatDate('Y-m-d',$model->birthdate),
                    'options' => array('dateFormat'=>'yy-m-d'),
                )); ?>
		<?php echo $form->error($model,'birthdate'); ?>
	</div>
        
        
	<div class="row short">
		<?php echo $form->labelEx($model,'pcellphone'); ?>
		<?php echo $form->textField($model,'pcellphone',array('size'=>12,'maxlength'=>12)); ?>
		<?php echo $form->error($model,'pcellphone'); ?>
	</div>

	<div class="row short">
		<?php echo $form->labelEx($model,'phomephone'); ?>
		<?php echo $form->textField($model,'phomephone',array('size'=>12,'maxlength'=>12)); ?>
		<?php echo $form->error($model,'phomephone'); ?>
	</div>

	<div class="row short">
		<?php echo $form->labelEx($model,'pemail'); ?>
		<?php echo $form->textField($model,'pemail',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'pemail'); ?>
	</div>

	<div class="row short">
		<?php echo $form->labelEx($model,'terminationdate'); ?>
		<?php $this->widget('zii.widgets.jui.CJuiDatePicker',array(
                    'model'=>$model,
                    'attribute'=>'terminationdate',
                    'value'=>CTimestamp::formatDate('Y-m-d',$model->terminationdate),
                    'options' => array('dateFormat'=>'yy-m-d'),
                )); ?>
		<?php echo $form->error($model,'terminationdate'); ?>
	</div>
        
        	<div class="row short">
		<?php echo $form->labelEx($model,'terminationreason'); ?>
		<?php echo $form->textArea($model,'terminationreason',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'terminationreason'); ?>
	</div>

        <?php if(count($model->getAssignedWarehouse())>0):?>
        <div class="row short">
            <label>Assigned warehouse</label>
            <div class="model-data">
                <?php foreach($model->getAssignedWarehouse() as $item):?>
                <?=$item['warehouseid'].' - '.$item['warehousedesc']?>
                <br/>
                <?php endforeach?>
            </div>
        </div>
        
        <?php endif?>

      <div class="row_buttons" style="margin-left:0">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>
  </div>     
  <div class="right-column" >
	<div class="row short">
		<?php echo $form->labelEx($model,'socsecnum'); ?>
            <?php //<div class="model-data">?>
                
                <?php /*echo $form->textField($model,'socsecnum',array('size'=>11,'maxlength'=>11)); ?><span><a href="javascript:void(0)" onclick="getSocsecNumber()">Show Social Number</a></span>
                <?php*/ echo $form->textField($model,'socsecnum',array('size'=>11,'maxlength'=>11)); ?><span style="position: absolute;"><a href="javascript:void(0)" onclick="getSocsecNumber()">Show</a></span>
            <?php //</div>?>
		
		<?php echo $form->error($model,'socsecnum'); ?>
	</div>
        

	<div class="row short">
		<?php echo $form->labelEx($model,'license'); ?>
		<?php echo $form->textField($model,'license',array('size'=>20,'maxlength'=>20)); ?>
		<?php echo $form->error($model,'license'); ?>
	</div>
        
	<div class="row short">
		<?php echo $form->labelEx($model,'title'); ?>
		<?php echo $form->textField($model,'title',array('size'=>60,'maxlength'=>75)); ?>
		<?php echo $form->error($model,'title'); ?>
	</div>
	<div class="row short">
    <?php echo $form->labelEx($model,'dept'); ?>
    <?php $data = CHtml::listData(Empgroup::model()->findAll(),'groupdesc','groupdesc') ?>
    <?php echo $form->dropDownList($model,'dept', $data); ?>
    <?php echo $form->error($model,'dept'); ?>
</div>

        
	<div class="row short">
		<?php echo $form->labelEx($model,'crew'); ?>
		<?php echo $form->textField($model,'crew',array('size'=>15,'maxlength'=>15)); ?>
		<?php echo $form->error($model,'crew'); ?>
	</div>
	<div class="row short">
            
		<?php echo $form->labelEx($model,'hrrate'); ?>
            <?php //<div class="model-data">?>
		<?php /*echo $form->textField($model,'hrrate'); ?><span><a href="javascript:void(0)" id="showHourRate">Show Hour Rate</a></span>
		<?php*/ echo $form->textField($model,'hrrate'); ?><span style="position: absolute;"><a href="javascript:void(0)" id="showHourRate">Show</a></span>
                <?php //</div>?>
		<?php echo $form->error($model,'hrrate'); ?>
	</div>

	<div class="row short">
		<?php echo $form->labelEx($model,'overhead'); ?>
		<?php echo $form->textField($model,'overhead'); ?>
		<?php echo $form->error($model,'overhead'); ?>
	</div>

	<div class="row short">
		<?php echo $form->labelEx($model,'percent'); ?>
		<?php echo $form->textField($model,'percent'); ?>
		<?php echo $form->error($model,'percent'); ?>
	</div>


	
	
	<div class="row short">
		<?php echo $form->labelEx($model,'vacationallowed'); ?>
		<?php echo $form->textField($model,'vacationallowed',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'vacationallowed'); ?>
	</div>

        <div class="row short">
		<?php echo $form->labelEx($model,'sickallowed'); ?>
		<?php echo $form->textField($model,'sickallowed',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'sickallowed'); ?>
	</div>

	<div class="row short">
		<?php echo $form->labelEx($model,'employdate'); ?>
		<?php $this->widget('zii.widgets.jui.CJuiDatePicker',array(
                    'model'=>$model,
                    'attribute'=>'employdate',
                    'value'=>CTimestamp::formatDate('Y-m-d',$model->employdate),
                    'options' => array('dateFormat'=>'yy-m-d'),
                )); ?>
		<?php echo $form->error($model,'employdate'); ?>
	</div>

	<div class="row short">
		<?php echo $form->labelEx($model,'workcell'); ?>
		<?php echo $form->textField($model,'workcell',array('size'=>12,'maxlength'=>12)); ?>
		<?php echo $form->error($model,'workcell'); ?>
	</div>
        
        
	<div class="row short">
		<?php echo $form->labelEx($model,'workext'); ?>
		<?php echo $form->textField($model,'workext',array('size'=>6,'maxlength'=>6)); ?>
		<?php echo $form->error($model,'workext'); ?>
	</div>
        
        
	<div class="row short">
		<?php echo $form->labelEx($model,'workemail'); ?>
		<?php echo $form->textField($model,'workemail',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'workemail'); ?>
	</div>
	<div class="row short">
		<?php echo $form->labelEx($model,'branch'); ?>
		<?php echo $form->textField($model,'branch',array('size'=>60,'maxlength'=>75)); ?>
		<?php echo $form->error($model,'branch'); ?>
	</div>

	<div class="row short">
		<?php echo $form->labelEx($model,'routefrom'); ?>
		<?php echo $form->dropDownList($model,'routefrom',$model->getRouteFromList()); ?>
		<?php echo $form->error($model,'routefrom'); ?>
	</div>
        <div class="row short">
            <?php echo $form->labelEx($model,'assigneddispatchboard');?>
            <?php echo $form->dropDownList($model,'assigneddispatchboard',  DispatchBoard::getList());?>
            <?php echo $form->error($model,'assigneddispatchboard');?>
        </div>

	
  </div>  
<?php $this->endWidget(); ?>

</div><!-- form -->
